<?php
    $xtpl = new XTemplate('Html/new_product.html');	
    $sql = "SELECT * FROM tbl_product ORDER BY `title` DESC";
    $query = mysql_query($sql);
    //check get number of rows in result
    if(mysql_num_rows($query)== 0){
        echo 'Data can not find';
    }
    else{
        //loop get result in tbl_product
        while($rows = mysql_fetch_array($query))
        {
            $xtpl->assign('New_Product',$rows);
            $xtpl->parse('Product_cont');
        }
    }
    $xtpl->out('Product_cont');
?>